from django_filters import rest_framework as filters
from comicinfo.models import ComicInfo


class ComicInfoFilter(filters.FilterSet):
    # ⬇ icontains 模糊搜索
    kind_name = filters.CharFilter(field_name='kind__kind_name', lookup_expr='icontains')

    # TODO 章节搜索

    class Meta:
        model = ComicInfo
        fields = ['kind', ]
